<template>
    <div class="h100p">
        <ezm-layout>
            <keep-alive>
                <router-view class="wh100p overflow-h"></router-view>
            </keep-alive>
            <van-tabbar v-model="tabActive" slot="toolbar" style="position:relative;" >
                <van-tabbar-item
                    v-for="item in tabs"
                    :key="item.path"
                    :name="item.path"
                    :icon="item.icon"
                    @click="g_navigate.to(item.path)"
                >{{ item.title }}
                </van-tabbar-item>
            </van-tabbar>
        </ezm-layout>
    </div>
</template>

<script>
    import EzmLayout from "@/components/layout/ezm-layout";
    import EzmScrollBox from "@/components/scroll/ezm-scroll-box";
    import {PageMixin} from "@/mixin/navigate.mixin";

    export default {
        name: 'index.vue',
        mixins: [PageMixin],
        components: {EzmScrollBox, EzmLayout},
        props: {},
        data() {
            return {
                tabActive: this.$route.path,
                tabs: [
                    {
                        path: '/',
                        title: '路由',
                        icon: 'cluster-o',
                    },
                    {
                        path: '/BetterScrollDemoIndex',
                        title: '无限滚动',
                        icon: 'points',
                    },
                    {
                        path: '/RequestDemoIndex',
                        title: '请求',
                        icon: 'exchange'
                    },
                ]
            }
        },
        computed: {},
        watch: {},
        created() {
        },
        mounted() {
        },
        destroyed() {
        },
        methods: {}
    };
</script>

<style lang="less">

</style>